package com.example.project.service;

import com.example.project.entity.SafetyTrain;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.Date;

/**
 * (SafetyTrain)表服务接口
 *
 * @author makejava
 * @since 2024-02-23 15:18:23
 */
public interface SafetyTrainService {

    /**
     * 通过ID查询单条数据
     *
     * @param safetyTrainId 主键
     * @return 实例对象
     */
    SafetyTrain queryById(Integer safetyTrainId);

    /**
     * 分页查询
     *
     * @param safetyTrain 筛选条件
     * @param pageRequest 分页对象
     * @param startTime
     * @param endTime
     * @param day
     * @param nextDay
     * @return 查询结果
     */
    Page<SafetyTrain> queryByPage(SafetyTrain safetyTrain, PageRequest pageRequest, Date startTime, Date endTime, Date day, Date nextDay);

    /**
     * 新增数据
     *
     * @param safetyTrain 实例对象
     * @return 实例对象
     */
    SafetyTrain insert(SafetyTrain safetyTrain);

    /**
     * 修改数据
     *
     * @param safetyTrain 实例对象
     * @return 实例对象
     */
    SafetyTrain update(SafetyTrain safetyTrain);

    /**
     * 通过主键删除数据
     *
     * @param safetyTrainId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer safetyTrainId);

    SafetyTrain insert1(SafetyTrain safetyTrain);
    /**
     * 删除成功进入回收站
     * 失败
     */
    boolean deleteById1(Integer safetyTrainId);

    Boolean deleteByIds(String ids);

    SafetyTrain update1(SafetyTrain data);
}
